__all__ = ['demo_api']
import json
from flask import request, Blueprint, jsonify
from website.service.demo_service import say_service
demo_api = Blueprint('demo_api', __name__)


@demo_api.route('/say', methods=['post'])
def say_api():
    # 获取参数
    param = json.loads(request.get_data(as_text=True))
    # 返回 json 数据
    return jsonify(say_service(param['hello']))
